﻿<Application
    x:Class="SenenFernandez.SmartImageComparer.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="clr-namespace:System;assembly=mscorlib"
    xmlns:p="clr-namespace:SenenFernandez.SmartImageComparer.Properties"
    xmlns:Converter="clr-namespace:SenenFernandez.SmartExtensionMethods.Converter;assembly=SenenFernandez.SmartExtensionMethods"
    DispatcherUnhandledException="AppDispatcherUnhandledException">
    <Application.Resources>
        <Converter:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
        <Converter:BoolToVisibilityInvertConverter x:Key="BoolToVisibilityInvertConverter" />

        <LinearGradientBrush x:Key="CustomBackground" StartPoint="0.5,0" EndPoint="0.5,1">
            <GradientStop Color="#7F3282FF" Offset="0"/>
            <GradientStop Color="#7F0082CC" Offset="0.325"/>
            <GradientStop Color="#7F0B82B1" Offset="0.5"/>
            <GradientStop Color="#7F0082CC" Offset="0.725"/>
            <GradientStop Color="#7F3282FF" Offset="1"/>
        </LinearGradientBrush>

        <Style x:Key="HeaderBorder" TargetType="Border">
            <Setter Property="Cursor" Value="Hand" />
            <Setter Property="DockPanel.Dock" Value="Top" />
            <Setter Property="HorizontalAlignment" Value="Stretch" />
            <Setter Property="VerticalAlignment" Value="Stretch" />
            <Setter Property="Margin" Value="2" />
            <Setter Property="Padding" Value="2" />
            <Setter Property="Background" Value="#6600AFFF" />
            <Setter Property="BorderThickness" Value="2" />
            <Setter Property="BorderBrush" Value="#CC00AFFF" />
            <Setter Property="CornerRadius" Value="5" />
        </Style>

        <Style x:Key="WindowTitle" TargetType="Label">
            <Setter Property="Foreground" Value="White" />
            <Setter Property="HorizontalAlignment" Value="Center" />
            <Setter Property="Content" Value="{Binding Title}" />
            <Setter Property="Effect">
                <Setter.Value>
                    <DropShadowEffect ShadowDepth="4" Direction="315" Color="#CC658FA2" Opacity="0.7" BlurRadius="4" />
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="DefaultButton" TargetType="Button">
            <Setter Property="Cursor" Value="Hand" />
            <Setter Property="FontWeight" Value="Bold" />
            <Setter Property="Foreground" Value="White" />
            <Setter Property="Background" Value="#CC0B6DB1" />
            <Setter Property="Border.CornerRadius" Value="5" />
            <Setter Property="BorderBrush" Value="Transparent" />
            <Setter Property="Padding" Value="5" />
        </Style>

        <Style x:Key="CloseButton" TargetType="Button" BasedOn="{StaticResource DefaultButton}">
            <Setter Property="DockPanel.Dock" Value="Right" />
            <Setter Property="Content" Value="X" />
            <Setter Property="Width" Value="32" />
            <Setter Property="HorizontalAlignment" Value="Right" />
            <Setter Property="IsCancel" Value="True" />
        </Style>

        <Style TargetType="Button" BasedOn="{StaticResource DefaultButton}" />

        <Style TargetType="TextBox">
            <Setter Property="FontWeight" Value="Bold" />
            <Setter Property="Padding" Value="5" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
        </Style>

        <Style TargetType="Label">
            <Setter Property="FontWeight" Value="Bold" />
            <Setter Property="VerticalContentAlignment" Value="Top" />
        </Style>

        <Style TargetType="ProgressBar">
            <Setter Property="Height" Value="20" />
            <Setter Property="Background" Value="Transparent" />
            <Setter Property="Foreground" Value="{StaticResource CustomBackground}" />
        </Style>

        <Style TargetType="Border">
            <Setter Property="Margin" Value="3" />
            <Setter Property="Padding" Value="3" />
            <Setter Property="BorderThickness" Value="2" />
            <Setter Property="CornerRadius" Value="5" />
            <Setter Property="BorderBrush" Value="#AA549BB0" />
            <Setter Property="Background" Value="#99FFFFFF" />
        </Style>

        <Style x:Key="TransparentWindow" TargetType="{x:Type Window}">
            <Setter Property="Title" Value="{x:Static p:Resources.ApplicationTitle}" />
            <Setter Property="SizeToContent" Value="WidthAndHeight" />
            <Setter Property="ShowInTaskbar" Value="False" />
            <Setter Property="Topmost" Value="True" />
            <Setter Property="WindowStyle" Value="None" />
            <Setter Property="AllowsTransparency" Value="True" />
            <Setter Property="Background" Value="Transparent" />
            <Setter Property="MinWidth" Value="400" />
            <Setter Property="MaxWidth" Value="800" />
            <Setter Property="MinHeight" Value="200" />
            <Setter Property="MaxHeight" Value="400" />
            <Setter Property="FontFamily" Value="Segoe UI" />
            <Setter Property="FontWeight" Value="Bold" />
            <Setter Property="FontSize" Value="14" />
            <Style.Triggers>
                <Trigger Property="AllowsTransparency" Value="False">
                    <Setter Property="Background" Value="#FFFFFFFF" />
                </Trigger>
            </Style.Triggers>
        </Style>

    </Application.Resources>
</Application>